import json
with open("detail_demo.json","r",encoding="utf-8") as f:
    data = json.load(f)

for da in data:
    surge_reason=da.get('surge_reason',{})
    if isinstance(surge_reason,str):
        surge_reason = json.loads(surge_reason)
    else:
        raw_symbol = surge_reason.get("symbol", "")
        symbol = raw_symbol.split('.')[0] if raw_symbol else ""
    print(symbol)
